<template>
  <v-text-field class="px-10 px-md-16 text-body-2 text-md-h6" v-model="input" :placeholder="placeholder">
  </v-text-field>
</template>



<script>
export default {
  data() {
    return {
      input: "",
      placeholder: "输入您的问题，三甲医生将为你解答",
      text: "输入您的问题，三甲医生将为你解答",
      timerID: 0,
      index: 0,
    };
  },
  mounted() {
    const that = this;
    that.timerID = setInterval(() => {
      that.index > that.text.length && (that.index = 0);
      that.placeholder = that.text.slice(0, that.index++);
    }, 300);
  },
};
</script>



<style lang="scss" scoped>
</style>
